<extend name="Public:Base" />
<block name="content">
	<div class="main-title">
		<h2><eq name="ACTION_NAME" value='add'>新增<else />编辑</eq>配置 [ <A HREF="__URL__">返回列表</A> ]</h2>
	</div>
	<FORM METHOD="POST" id="form1" class="form-horizontal" action="__URL__/<eq name="ACTION_NAME" value="add">insert<else />update</eq>">
			<div class="form-item cf">
				<label class="item-label">变 量：<span class="check-tips"></span></label>
				<div class="controls"><INPUT TYPE="text" class="text input-large" NAME="name" value="{$vo.name}"  dataType="*1-25" nullmsg="配置名不能为空,且不能含有空格" errormsg="配置名不能为空,且不能含有空格">
					</div>
				</div>
			<div class="form-item cf">
				<label class="item-label">名 称：<span class="check-tips"></span></label>
				<div class="controls">
					<INPUT TYPE="text" class="text input-large"  NAME="title" value="{$vo.title}">
				</div>
			</div>
			<div class="form-item cf">
				<label class="item-label">配 置：<span class="check-tips"></span></label>
				<div class="controls">
				<TEXTAREA style="overflow:auto" class="text input-large " NAME="value" ROWS="5" COLS="35">{$vo.value}</TEXTAREA>
				</div>
			</div>
			<div class="form-item cf">
				<label class="item-label">类 型：<span class="check-tips"></span></label>
				<div class="controls">
					<SELECT class="medium bLeft" NAME="type">
						<option <eq name="vo.type" value="0" >selected</eq> value="0">字符型</option>
						<option <eq name="vo.type" value="1" >selected</eq> value="1">数字型</option>
						<option <eq name="vo.type" value="2" >selected</eq> value="2">布尔型</option>
						<option <eq name="vo.type" value="3" >selected</eq> value="3">文本型</option>
						<option <eq name="vo.type" value="4" >selected</eq> value="4">枚举型</option>
					</SELECT>
				</div>
			</div>
			<div class="form-item cf">
				<label class="item-label">
					参 数：
					<span class="check-tips">
						布尔型、枚举型请输入参数（用,分割多个参数 用:分割值和显示）,布尔型采用两个参数，前面的表示否
					</span>
				</label>
				<div class="controls">
					<TEXTAREA class="text input-large" NAME="extra" ROWS="5" COLS="35">{$vo.extra}</TEXTAREA>
				</div>
			</div>
			<div class="form-item cf">
				<label class="item-label">备  注：<span class="check-tips"></span></label>
				<div class="controls">
					<TEXTAREA class="text input-large" NAME="remark" ROWS="5" COLS="35">{$vo.remark}</TEXTAREA>
				</div>
			</div>
		<div class="form-item">
			<INPUT TYPE="hidden" name="id" value="{$vo.id}">
			<INPUT TYPE="hidden" name="jumpurl" value="{$Think.server.HTTP_REFERER}">
			<button type="submit" class="btn submit-btn ajax-post">确 定</button>
			<button class="btn btn-return" onclick="javascript:history.back(-1);return false;">返 回</button>
		</div>
	</FORM>
	<script type="text/javascript">
	$(function(){
		$('#form1').Validform({
			tiptype:function(msg,o,cssctl){
                if(!o.obj.is("form")){
                	var pele=o.obj.parents('.form-item');
                    var infoObj=pele.find(".check-tips");
                    if (!infoObj || infoObj.length==0){
                        pele.find(".item-label").append('<span class="check-tips"></span>');
                    }
                    infoObj=pele.find(".check-tips");
                    if(o.type==2){
                        infoObj.removeClass('error');
                        infoObj.hide();
                    }else{
                        infoObj.addClass('error');
                        infoObj.html(msg).show();
                    }
                }
            }
		});
	})
	</script>
</block>